package game;

import java.awt.Graphics2D;
import java.awt.Point;

class Level_05 extends BaseLevel
{
	float timeAnimationEnemie = 0.1f;

	public Level_05()
	{
		super();
		this.sizeMap = new Point(2000, 2000);
		respawn  = new Respawn(new Point(925,725), 14,  4.0f);
		mapa = new Mapa_05(sizeMap);
		
		player.intMine=5;
		CapacitorManager.getInstance().maxEnimie = 15;
		CapacitorManager.getInstance().minEnimie = 12;
		
	}
    public void update()
    {    	
    	super.update(Mapa_05.getObstaculos());
    	mapa.Update();
    	
    	//System.out.println();
    	//System.out.println("POSICAO:  " + (int)mapa.getPosition().getX());
    	switch(Game.rand.nextInt(5))
    	{
			case 0:
				respawn.Update(new Inimigo_01(15,
						super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
						new Point(40,40),
						new Point(0,0), 
						new Point(40,40),
		    			new Point(3,1),
		    			timeAnimationEnemie,
		    			true,
		    			100,
		    			3.5f),
		    			player,
		    			Mapa_01.getObstaculos(),
		    			3);
		    	
				break;
	
			case 1:
				respawn.Update(new Inimigo_02(16,
						super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
						new Point(40,40),
						new Point(0,0),
						new Point(40,40),
		    			new Point(4,1),
		    			timeAnimationEnemie,
		    			true,
		    			100,
		    			3.5f),
		    			player,
		    			Mapa_01.getObstaculos(),
		    			3);
		    	
				break;
	
			case 2:
				respawn.Update(new Inimigo_03(18,
						super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
						new Point(40,40),
						new Point(0,0), 
						new Point(40,40),
		    			new Point(3,1),
		    			timeAnimationEnemie,
		    			true,
		    			100,
		    			3.5f),
		    			player,
		    			Mapa_01.getObstaculos(),
		    			4);
		    	break;
		
			case 3:
				respawn.Update(new Inimigo_04(17,
						super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
						new Point(40,40),
						new Point(0,0),
		    			new Point(40,40),
		    			new Point(3,1),
		    			timeAnimationEnemie,
		    			true,
		    			100,
		    			3.5f),
		    			player,
		    			Mapa_01.getObstaculos(),
		    			3);
		    	break;
		    	
			case 4:
				respawn.Update(new Inimigo_05(19,
						super.PosicaoInicialInimigo(mapa.getPosition(), sizeMap),
						new Point(40,40),
						new Point(0,0), 
		    			new Point(40,40),
		    			new Point(3,1),
		    			timeAnimationEnemie,
		    			true,
		    			100,
		    			3.5f),
		    			player,
		    			Mapa_01.getObstaculos(),
		    			3);
		    	break;
    	}
    	
		
    }

	public void draw(Graphics2D g2d)
    {
        g2d.drawString("LEVEL: " + 0, 10, 10);
        mapa.draw(g2d);
        super.draw(g2d);
        super.Draw2(g2d);
    }
}